package com.cj;

import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * @author cc
 * @date 2025-05-11 21:21
 **/

public class Demo01 {

    public static void main(String[] args) {
        // 容器构建的过程中，bean就已经被创建了
        ClassPathXmlApplicationContext ctx = new ClassPathXmlApplicationContext("applicationContext.xml");

        Book book = ctx.getBean("book", Book.class);
        System.out.println("book = " + book);


        Cat cat = ctx.getBean("cat", Cat.class);

    }
}
